<!DOCTYPE html>
<html>
  <head>
    <title>Acceleration Example</title>

    <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    <script type="text/javascript" charset="utf-8">
    document.addEventListener("deviceready", onDeviceReady, false);

    // device APIs are available
    //
    // PhoneGap加载完毕
	function onDeviceReady() {
		alert('start');
		window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
	}
	
	function onFileSystemSuccess(fileSystem) {
		alert(fileSystem.name+' abc '+fileSystem.root.name);
	}
	
	function fail(evt) {
		alert('efg');
		console.log(evt.target.error.code);
	}
    </script>
  </head>
  <body>
    <div id="accelerometer">Waiting for accelerometer...</div>
  </body>
</html>